<#if workCentersTree??>
<ul class="tree treeFolder expand">
	<@macroWorkCenterTree children=workCentersTree />
</ul>
</#if>
<!-- 递归产生树的宏定义 -->
<#macro macroWorkCenterTree children> 
	<#if children?? && children?size gt 0> 
		<#list children as workCenter>
			<li class='workCenter' workcenterCode="${workCenter.workCenterCode!''}">
				<a onclick="$(this).trigger('check');" title="工作中心">${workCenter.workCenterText!''}</a>
				<#if workCenter.childrens?? || workCenter.workUnits?size gt 0>
					<ul>
						<@macroWorkCenterTree children = workCenter.childrens /> 
						<#list workCenter.workUnits as workUnit>
							<li class="workUnit" workunitCode="${workUnit.workUnitCode!''}">
								<a onclick="$(this).trigger('check');" title="作业单元">${workUnit.workUnitText!''}</a>
								<#if workUnit.andongroups && workUnit.andongroups?size gt 0>
									<ul>
										<#list workUnit.andongroups as andonGroup>
										<li class="andonGroup" workunitCode="${workUnit.workUnitCode!''}" andonGroup="${andonGroup.andonGroup!''}">
											<a onclick="$(this).trigger('check');" title="按灯组">${andonGroup.andonGroup!''}</a>
										</li>
										</#list>
									</ul>
								</#if>
							</li> 
						</#list>
					</ul> 
				</#if>
			</li> 
		</#list> 
	</#if> 
</#macro>
